import Vue from 'vue';
import echarts from 'echarts'
import VueTour from 'vue-tour'
import axios from './router/axios';
import App from './App';
import router from "./router";
import store from './store';
import {loadStyle} from './util/util'
import * as urls from '@/config/env';
import basicContainer from '@/components/system/main'
import {iconfontUrl,iconfontVersion} from '@/config/env';
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
import './styles/common.scss';
require('vue-tour/dist/vue-tour.css')
//注册全局容器
Vue.component('basicContainer', basicContainer)
// 加载相关url地址
Object.keys(urls).forEach(key => {
  Vue.prototype[key] = urls[key];
})

// 动态加载阿里云字体库
iconfontVersion.forEach(ele => {
  loadStyle(iconfontUrl.replace('$key', ele));
})
Vue.use(VueTour)
Vue.use(Viewer);
Viewer.setDefaults({
  Options: {
    "inline": true,
    "button": true,
    "navbar": true,
    "title": true,
    "toolbar": true,
    "tooltip": true,
    "movable": true,
    "zoomable": true,
    "rotatable": true,
    "scalable": true,
    "transition": true,
    "fullscreen": true,
    "keyboard": true,
    "url": "data-source"
  }
});
Vue.use(router)
Vue.use(axios)
Vue.config.productionTip = false;
Vue.prototype.$echarts = echarts;
Vue.prototype.$height = document.documentElement.clientHeight;//屏幕高度
Vue.prototype.bus = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
